namespace hjc {

	export class ViewSort extends Component {

		private SORT_INTVL = 0.5;//秒
		// protected $delta = 15;
		private $view: egret.DisplayObjectContainer;
		private $horizontal: boolean;
		private $reversed: boolean;
		public get view(): egret.DisplayObjectContainer { return this.$view; }
		public get horizontal(): boolean { return this.$horizontal; }
		public set horizontal(horizontal: boolean) { this.$horizontal = horizontal; }
		public get reversed(): boolean { return this.$reversed; }
		public set reversed(reversed: boolean) { this.$reversed = reversed; }

		public init(view?: egret.DisplayObjectContainer, horizontal?: boolean, reversed?: boolean): void {
			this.$view = null;
			this.$horizontal = false;
			this.$reversed = false;
			super.resetPfc();
			if (!!view) this.$view = view;
			if (isBoolean(horizontal)) this.horizontal = horizontal;
			if (isBoolean(reversed)) this.reversed = reversed;
		}
	}
}